import request from "@Utils/request"
import webrequest from "@Utils/webServerRequest"

// 获取运费模板
export const getShopFreightTemplateAllData = (data) => {
  return request({
    url: `freight/template/getShopFreightTemplate`,
    method: "get",
    paramete: {
      page: data.page || 1,
      pageSize: data.pageSize || data.page_size || data.size || 100,
      _bid: "ffa_order"
    }
  })
}


// 获取当前店铺shopid
export const getShopIdData = (data) => {
  return request({
    url: `shopuser/cb/price/shopInfo`,
    method: "get",
    paramete: {
      verifyFp: data.verifyFp,
      fp: data.fp,
    }
  })
}

// 获取当前店铺信息
export const getShopInfoData = (data) => {
  return request({
    url: `common/index/index`,
    method: "get",
    paramete: {

    }
  })
}

// 获取店铺客服手机号
export const getShopUserPhone = (data) => {
  return request({
    url: `shopuser/tshopcustomerservice/getcustomerservicelist`,
    method: "get",
    paramete: {
      verifyFp: data.verifyFp,
      fp: data.fp,
    }
  })
}

export const upDataImage = (data) => {
  return request({
    url: `product/img/batchupload`,
    method: 'post',
    paramete: {
      _bid: 'ffa_goods'
    },
    data
  })
}

export const upDataImageNewApi = (data) => {
  return request({
    url: `product/img/batchupload`,
    method: 'post',
    timeout: 40 * 1000,
    paramete: {
      _bid: 'ffa_goods'
    },
    data
  })
}

// 获取视频详情
export const getVideoDetail = (data) => {
  return request({
    url: `product/video/uploadVideoToken`,
    method: "get",
    paramete: {
      vid: data.vid,
      _bid: "ffa_goods"
    }
  })
}

// 获取视频详情
export const getVideoDetailNewApi = (data) => {
  return request({
    url: 'https://vod.bytedanceapi.com/?' + data,
    method: "get",
    timeout: 40 * 1000,
    baseURL: '',
    paramete: {
      // ...data
    }
  })
}